module.exports = {
    configureWebpack:{
        devServer: {
            before(app) {
              app.get('/api/login', (req, res) => {
                // res.json({
                //   code: 0,
                //   data: seller
                // })
                const {username,password}=req.query;
                if(username==="djw"&&password==="123"){
                    res.json({
                        code:0,
                        token:"myNameIsToken",
                        msg:"登录成功!"
                    })
                }else{
                    res.json({
                        code:1,
                        msg:"登录失败"
                    })
                }
              })
              app.get('/api/logout',(req,res)=>{
                  res.json({
                      code:-1
                  })
              })
            }
        }
        
    }
    
  }